package com.jg.config;

import org.springframework.context.annotation.*;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 86130
 * @version 1.0
 * @description: TODO
 * @date 2025/9/2 上午10:14
 */
@Configuration  // 声明当前类为配置类
@Import({MybatisConfig.class, JdbcConfig.class})   // 引入Mybatis配置类
@PropertySource("classpath:database.properties")    // 引入数据库配置文件
@ComponentScan(
        // 指定要扫描的包
        basePackages = "com.jg",
        // 扫描除了controller的类
        excludeFilters = {
                @ComponentScan.Filter(type = FilterType.ANNOTATION, classes = Controller.class),
                @ComponentScan.Filter(type = FilterType.ANNOTATION, classes = RestController.class)
        }
)
public class SpringConfig {
}
